package com.freemalll.auth.cloud.business.domain.dto;

import com.freemalll.auth.cloud.business.domain.dto.validation.AddGroup;
import com.freemalll.auth.cloud.business.domain.dto.validation.UpdateGroup;
import com.freemalll.common.mybatis.dto.PageDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 系统应用表 sys_application
 *
 * @author freemalll
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysApplicationDto extends PageDto implements Serializable {

    @Schema(description = "应用ID")
    private String appId;

    @Schema(description = "应用编码")
    @NotBlank(message = "应用编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Size(min = 1, max = 50, message = "应用编码长度必须在1-50个字符之间", groups = {AddGroup.class, UpdateGroup.class})
    private String appCode;

    @Schema(description = "应用名称")
    @NotBlank(message = "应用名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Size(min = 1, max = 100, message = "应用名称长度必须在1-100个字符之间", groups = {AddGroup.class, UpdateGroup.class})
    private String appName;


    @Schema(description = "跳转地址")
    private String skipUrl;

    @Schema(description = "租户id")
    private String tenantId;
}
